package com.zhihui.api;

/**
 * Created by hengxing on 2017/9/11.
 */

import com.github.pagehelper.PageHelper;
import com.zhihui.mapper.SystemUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/system/user")
public class SystemUserApi {


   /* @Autowired
    private SystemUserService systemUserService;
*/

   @Autowired
   private SystemUserMapper systemUserMapper;



    @RequestMapping("/userList")
    @ResponseBody
    public Object queryUserList(){
        PageHelper.startPage(0,12);

        List<Map<String, Object>> objList=systemUserMapper.queryObjList();
        System.out.println("查询结果长度:"+objList.size());

        return objList;
    }





}
